/*
 * AppConst.h
 *
 *  Created on: 2018年1月2日
 *      Author: chuanjiang.zh@qq.com
 */

#ifndef APPCONST_H_
#define APPCONST_H_

#include "BasicType.h"
#include <string>

class AppConst
{
public:
	AppConst();
	virtual ~AppConst();

	static const int THREAD_STACK_SIZE = 1024 * 1024;

	static const int STREAM_TIMEOUT = 3;

	static int HTTP_PORT;

	static int RTSP_PORT;
	static int FLV_PORT;

    static const int PAGE_SIZE = 10;

	static int SEND_BUFFER_SIZE;

	static int SOCKET_BUFFER_SIZE;

	/// 通道超时, 单位为秒, 表示没有推送源后多久
	static int CHANNEL_TIMEOUT;

	/// 交互命令超时, 单位为秒
	static int COMMAND_TIMEOUT;

	/// 消息超时
	static int MESSAGE_TIMEOUT;

	static bool DUMP_ENABLED;

	static int DELAY_CLOSE;

	static const int KEEPALIVE_DURATION = 60;

    static const char*  SYSLOG_FILENAME;

    static int RECORD_DURATION;

    static int SUPER_USER_ID;
	static const char* SUPER_USER;
	static const char* SUPER_PASSWORD;

	static bool IS_TRIAL_VERSION;
	static int64_t	EXPIRY;
	static int  MAX_CHANNEL_COUNT;
	static std::string APP_ID;


	static std::string getEtcDir();

	static std::string getInstallDir();


    static std::string getAppDir();
    static void setAppDir(const std::string& dir);
	
protected:
    static std::string  s_appDir;

};

#endif /* APPCONST_H_ */
